Apparatus and method for automatically adjusting size of characters using camera

ABSTRACT

A method is provided for automatically adjusting a size of characters using a camera. The method includes receiving an image with characters; adjusting a focus of the image with characters and detecting a region and a size of characters in the image; determining whether the size of the characters in the image falls within a preset range; recognizing the characters in the image and displaying the recognition results, if the size of the characters falls within the preset range; and automatically adjusting a zoom ratio of the image and recognizing the characters in the resized image, if the size of the characters does not fall within the preset range.

PRIORITY

This application is a Divisional Application of U.S. application Ser.No. 12/632,101, which was filed in the U.S. Patent and Trademark Officeon Dec. 7, 2009 and claims priority under 35 U.S.C. § 119(a) to a KoreanPatent Application filed in the Korean Intellectual Property Office onDec. 5, 2008 and assigned Serial No. 10-2008-0123019, the contents ofeach of which are incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates generally to character recognition using acamera, and more particularly, to an apparatus and method for optimizinguser views by adjusting a size of characters in an image received bymeans of a camera.

2. Description of the Related Art

Camera-based Optical Character Recognition (OCR) may be classified intoSnapshot OCR (OCR based on a view of an image to be photographed) andPreview OCR (OCR based on a preview image or viewfinder images). InSnapshot OCR, an image is acquired according to the same method as anormal method for acquiring an image for a photograph. The imageacquisition process includes, in turn, photographing desired charactersby means of a camera, performing a character recognition process on thephotographed characters, and outputting the recognition results to anoutput unit.

By contrast, in Preview OCR, images are input at a preset rate of FramesPer Second (FPS). Therefore, in Preview OCR, character recognition ispossible in real time. Generally, an image acquisition process ofPreview OCR includes scanning characters by a user by means of a camera,and continuously performing a recognition operation on an image receivedthrough the camera using a recognizer in the camera.

The largest difference between Snapshot OCR and Preview OCR consists inthe resolution of an image to be recognized. While Preview OCRrecognizes a small image of Quater Video Graphics Array (QVGA; 320×240)for real-time recognition, Snapshot OCR recognizes an image of 1 Megapixels or more, thus having a longer recognition time compared withPreview OCR. Due to the use of high-resolution images, Snapshot OCR isfar superior to Preview OCR in character recognition capability.Recently, as the performance of cameras improves and accuraterecognition becomes increasingly important, Snapshot OCR has becomewidely used than Preview OCR.

It is possible for Snapshot OCR to recognize all characters in an inputimage, or characters corresponding to a particular region among all thecharacters in the input image. Hence, a user may perform fullrecognition on the image displayed on a Liquid Crystal Display (LCD)screen of the camera, or perform partial recognition on a particularregion designated.

FIG. 1 illustrates a conventional process of recognizing characters inan image.

In step 101, a mobile terminal receives an image with characters using acamera module. In step 103, the mobile terminal may acquire a focusedimage from the received image using an Automatic Focusing (Auto-Focus)technique. In step 105, the mobile terminal stores the acquired focusedimage in a separate storage. In step 107, the mobile terminal recognizescharacters in the stored image. The mobile terminal may recognize allthe characters in the image or only characters in a region of the imageselected by the user. In step 109, the mobile terminal displays therecognition results on its display.

Since, unlike the conventional name-card recognition, Snapshot OCR hasno limitation on a recognizable distance desired by the user, charactersin the input image may vary in size. For example, when an image, inwhich very large characters and very small characters are included invarious ways, is resized on an LCD, the sizes of the displayedcharacters are also appear very small and very large, proportionally tothe actual image. The excessively large or small size of the charactersdisplayed on the LCD may reduce recognition efficiency or causerecognition failure.

SUMMARY OF THE INVENTION

An aspect of the present invention is to address at least theabove-mentioned problems and/or disadvantages and to provide at leastthe advantages described below. Accordingly, an aspect of the presentinvention provides an apparatus and method for optimizing a size ofcharacters in an image by automatically adjusting a zoom ratio using azoom function of a camera when the size of the characters in the imagedoes not fall within a predetermined range.

According to one aspect of the present invention, there is provided amethod for automatically adjusting a size of characters using a camera.The method includes receiving an image containing characters; adjustinga focus of the image and detecting a region and a size of characters inthe image; determining whether the size of the characters in the imagefalls within a preset range; recognizing the characters in the image anddisplaying recognition results, if the size of the characters fallswithin the preset range; and automatically adjusting a zoom ratio of theimage and recognizing the characters in the resized image, if the sizeof the characters does not fall within the preset range.

According to another aspect of the present invention, there is providedan apparatus for automatically adjusting a size of characters using acamera. The apparatus includes a camera module for receiving an imagecontaining characters, transmitting the received image, andautomatically adjusting a zoom ratio if a size of the characters doesnot fall within a preset range; a recognizer module for transmittingcharacter recognition results received after transmitting the imagereceived from the camera module; a Optical Character Recognition (OCR)recognition engine module for determining whether a size of charactersin the image received from the recognizer module falls within the presetrange; and a dictionary module for providing a dictionary definition ofthe recognized characters received from the recognizer module.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other aspects, features and advantages of certainembodiments of the present invention will be more apparent from thefollowing description taken in conjunction with the accompanyingdrawings, in which:

FIG. 1 is a flowchart illustrating a conventional process of recognizingcharacters in an image;

FIG. 2 is a diagram illustrating an internal structure of a mobileterminal for recognizing characters according to an embodiment of thepresent invention;

FIG. 3 is a flowchart illustrating a process of recognizing charactersin an image according to an embodiment of the present invention; and

FIGS. 4 and 5 are flowcharts illustrating a process of enlarging a sizeof characters in an image using a zoom function according to anembodiment of the present invention.

DETAILED DESCRIPTION OF EMBODIMENTS

The matters defined in the description such as a detailed constructionand elements are provided to assist in a comprehensive understanding ofembodiments of the invention. Accordingly, those of ordinary skill inthe art will recognize that various changes and modifications of theembodiments described herein can be made without departing from thescope and spirit of the invention. Also, descriptions of well-knownfunctions and constructions are omitted for clarity and conciseness.

Since conventional mobile terminals for recognizing characters in animage have no limitations on recognizable distances desired by users,excessively large or small size of characters in an input image may notbe properly recognized in a character recognition process. To addressthese and other problems and/or disadvantages, the present inventionprovides an apparatus and method for receiving an image with charactershaving a proper size, by means of a zoom function, for preciserecognition of the characters. Features of the present invention will bemore apparent by describing certain embodiments of the presentinvention.

FIG. 2 illustrates an internal structure of a mobile terminal forrecognizing characters according to an embodiment of the presentinvention. The mobile terminal includes a recognizer module 207, an OCRrecognition engine module 209, a camera module 201, a display module203, and a dictionary module 205.

Referring to FIG. 2, the recognizer module 207, a module for controllingthe overall operation of an application called Snapshot OCR, mainlyinitiates and terminates an application for recognizing characters in animage, like character recognition of a camera. In accordance with anembodiment of the present invention, the recognizer module 207implements pre-recognition, including resizing an image received fromthe camera module 201 for recognition of characters in the image.

The OCR recognition engine module 209 receives the image with charactersfrom the recognizer module 207, performs character recognition on thereceived image, and transmits the recognition results back to therecognizer module 207. As to the criteria for recognizing characters,the OCR recognition engine module 209 determines whether a size of thecharacters falls within a preset range of a recognizable character size,and transmits the determined results back to the recognizer module 207.

The camera module 201 receives an image with characters by driving andcontrolling a camera. In the process of receiving an image, the cameramodule 201 captures a clear image using an Auto-Focus function, and ifthe size of the characters in the image is excessively large or small,captures an image with characters having a size desired by the userusing a zoom function. Auto-Focus, an important function for increasingan image recognition rate, serves to increase a resolution of an inputimage.

The display module 203 outputs at least one of a camera preview image, aphotographed image, and character recognition results on a screen.

The dictionary module 205 provides a dictionary definition of thecharacters recognized by the OCR recognition engine module 209 based ona dictionary search interface function. A variety of information in thedictionary module 205 is stored in a DataBase (DB) in the mobileterminal. However, if required information is not stored in the DB inthe mobile terminal, the dictionary module 205 may receive the requiredinformation from a DB in a server. A process of recognizing charactersin an image using the aforesaid structure will be described as follows.

FIG. 3 illustrates a process of recognizing characters in an imageaccording to an embodiment of the present invention.

Referring to FIG. 3, the mobile terminal receives an image withcharacters using a camera module, in step 301. The received image may bedisplayed for viewing by a user. In step 303, the mobile terminalacquires a focused image by adjusting the focus of the received imageusing an automatic focusing technique. In step 305, the mobile terminaldetects a character region within the acquired image by means of acharacter size measurer, and then detects a size of the characterswithin the character region by detecting a line on which charactersexist, in the X- and Y-axes with use of a threshold, and calculates anaverage size of characters on the line.

In step 307, the mobile terminal compares the measured character sizewith a preset range of a recognizable character size, and determineswhether the measured character size falls within the range of therecognizable character size. If the measured character size does notfall within the range, the mobile terminal automatically adjusts a zoomratio, or a zoom magnification, so that the measured character sizefalls within the range, and then receives the resized image in step 309.After performing step 309, the method returns to step 303, where themobile terminal adjusts the focus of the zoomed image, and thenre-performs the character region and size detection in step 305.

If the measured character size falls within the range of therecognizable character size in step 307, the mobile terminal stores theimage for accurate character recognition in step 311. The mobileterminal recognizes characters in the stored image in step 313, anddisplays the recognition results corresponding to the informationdesired by the user, on a display in step 315.

In FIG. 3, when the measured character size does not fall within therange of the recognizable character size, the character size may beexcessively large or excessively small. When the character size isexcessively large, the mobile terminal may simply decrease the zoomratio and receive the resized image. However, if the character size isexcessively small and the zoom ratio has already been increased to themaximum zoom ratio, the increased character size may still not fallwithin the recognizable character size range. In this case, charactersin the image may be recognized as follows.

FIGS. 4 and 5 illustrate processes of enlarging a size of characters inan image using a zoom function according to an embodiment of the presentinvention. As an example, FIG. 4 illustrates a method for a mobileterminal that supports only an optical zoom function, while FIG. 5illustrates a method for a mobile terminal supporting both an opticalzoom function and digital image zoom function. In both FIGS. 4 and 5,the mobile terminal first uses an optical zoom function, which does notinfluence the image quality. In FIG. 5, the mobile terminal uses adigital image zoom function, when the mobile terminal cannot recognizecharacters only with the optical zoom function.

Referring to FIG. 4, the mobile terminal receives an image withcharacters using a camera module in step 401. The received image may bedisplayed for viewing by a user. In step 403, the mobile terminalacquires a focused image by adjusting the focus of the received imageusing the automatic focusing technique. In step 405, the mobile terminaldetects a character region from the acquired image by means of acharacter size measurer, and then detects a size of the characterswithin the character region.

In step 407, the mobile terminal determines whether the detectedcharacter size is greater than a predetermined minimum size of adistinguishable character. If the measured character size is greaterthan the minimum size, the mobile terminal stores the image for precisecharacter recognition in step 409, recognizes characters in the storedimage in step 411, and displays the recognition results corresponding tothe information desired by the user, on a display in step 413.

However, if the measured character size is less than the size of theminimum distinguishable character in step 407, the mobile terminalautomatically adjusts a zoom ratio in step 415. In step 417, the mobileterminal determines whether the adjusted zoom ratio is the maximum zoomratio. If the adjusted zoom ratio is not the maximum zoom ratio, themobile terminal re-receives the image enlarged at the adjusted zoomratio in step 419. However, if the adjusted zoom ratio is the maximumzoom ratio, the mobile terminal cannot recognize the detected charactersas the mobile terminal cannot further increase the zoom ratio.Therefore, the mobile terminal displays a manual action request messageon an output unit or a display for the user in step 421, informing thatit is not possible to distinguish the detected characters at the currentlocation of the user. In this case, the user may acquire a desired sizeof characters by moving the mobile terminal closer to the subject havingthe characters.

Referring to FIG. 5, the mobile terminal receives an image withcharacters using a camera module in step 501. The received image may bedisplayed for viewing by a user. In step 503, the mobile terminalacquires a focused image by adjusting the focus of the received imageusing the automatic focusing technique. In step 505, the mobile terminaldetects a character region from the acquired image by means of acharacter size measurer, and then detects a size of the characters.

In step 507, the mobile terminal determines whether the detectedcharacter size is greater than a predetermined minimum size of adistinguishable character. If the measured character size is greaterthan the minimum size, the mobile terminal stores the image for precisecharacter recognition in step 509. The mobile terminal recognizescharacters in the stored image in step 511, and displays the recognitionresults corresponding to the information desired by the user, on itsdisplay in step 513.

If the measured character size is less than the size of the minimumdistinguishable character in step 507, the mobile terminal automaticallyadjusts a zoom ratio in step 515. In step 517, the mobile terminaldetermines whether the adjusted zoom ratio is the maximum zoom ratio. Ifthe adjusted zoom ratio is not the maximum zoom ratio, the mobileterminal re-receives the image enlarged at the adjusted zoom ratio instep 519. However, if the adjusted zoom ratio is the maximum zoom ratio,the mobile terminal provides the user with a message indicating that thecharacter size is small for recognition, and stores the image in step521. This message is displayed on an output unit or display of themobile terminal. In step 523, the mobile terminal enlarges a regioncorresponding to characters in the stored image using a digital imagezoom function. Thereafter, the mobile terminal recognizes characters inthe enlarged image using the image zoom in step 509, and displays therecognition results in step 513.

As is apparent from the foregoing description, embodiments of thepresent invention can optimize the size of characters in an image sothat the user may easily carry out an operation of distinguishing andrecognizing characters in the image on the LCD, thereby increasing thecharacter recognition rate.

While an apparatus and method for adjusting a size of characters using acamera according to the present invention has been shown and describedwith reference to a certain embodiments of the present invention, itwill be understood by those skilled in the art that various changes inform and details may be made therein without departing from the spiritand scope of the invention as defined by the appended claims and theirequivalents.

What is claimed is:
 1. An electronic device comprising: a camera; adisplay; and a processor configured to: control the camera to obtain animage containing characters; detect a region and a size of characters inthe image; control to determine whether the size of the characters inthe image falls within a recognizable character size range; in responseto detecting that the size of the characters falls within therecognizable character size range, recognize the characters in the imageand control the display to display recognition results; in response todetecting that the size of the characters does not fall within therecognizable character size range, control the camera to automaticallyadjust an optical zoom ratio of the camera and resize the obtained imageso that the size of the characters in the image falls within therecognizable character size range, and recognize the characters in theresized image; determine whether the adjusted optical zoom ratio is amaximum zoom ratio; and if the adjusted optical zoom ratio is determinedto be the maximum zoom ratio, output a message indicating that the sizeof the characters in the detected region is less than a lower limit ofthe recognizable character size range, and enlarge a regioncorresponding to the characters in the resized image using a digitalzoom function, wherein the recognition of the characters is performed onthe characters in the enlarged region.
 2. The electronic device of claim1, wherein the processor is further configured to: control the camera toadjust a focus of the camera using an automatic focusing technique. 3.The electronic device of claim 2, wherein the processor is furtherconfigured to: detect a line on which the characters in the image exist,in an X-axis and a Y-axis; and detect the region and the size of thecharacters by calculating a height and a length of the characters on theline.
 4. The electronic device of claim 1, wherein the processor isfurther configured to: if the size of the characters is greater than therecognizable character size range, control the camera to automaticallydecrease the optical zoom ratio and re-acquire the resized image; and ifthe size of the characters is less than the lower limit of therecognizable character size range, control the camera to automaticallyincrease the optical zoom ratio and re-acquire the resized image.
 5. Theelectronic device of claim 1, wherein the processor is furtherconfigured to: if the size of the characters is less than the lowerlimit of the recognizable character size range and if an optical zoomratio needed to compensate the image is higher than a maximum zoomratio, provide a manual action request message to a user.
 6. Theelectronic device of claim 1, wherein the processor is furtherconfigured to: if the size of the characters is less than the lowerlimit of the recognizable character size range and if an optical zoomratio needed to compensate the image is higher than the maximum zoomratio, generate a user notification for informing a user that the sizeof the characters is less than a lower limit of the recognizablecharacter size range and display the image; enlarge the regioncorresponding to the characters in the image using the digital imagezoom function; and recognize the characters in the enlarged region anddisplay recognition results.
 7. The electronic device of claim 1,wherein the processor is further configured to: control the camera toadjust a focus of the camera; detect a region of the image that includesat least two characters; detect a size of at least one character of theat least two characters in the detected region; control the camera toadjust the optical zoom ratio of the camera, by controlling the camera,if the size of the at least one character is not greater than a minimumdistinguishable character size; determine whether the adjusted opticalzoom ratio is a maximum zoom ratio; if the adjusted optical zoom ratiois determined to be the maximum zoom ratio, output a message indicatingthat the size of the at least one character in the detected region isless than a lower limit of the recognizable character size range;enlarge a region corresponding to the at least two characters in theresized image using a digital zoom function; and recognize the at leasttwo characters in the enlarged region and display recognition results.8. The electronic device of claim 7, wherein the message indicating thatthe size of the at least one character in the detected region is toosmall for character recognition includes a request that a user of theelectronic device manually adjust the camera.
 9. The electronic deviceof claim 7, wherein the character recognition is performed of the atleast two characters in the enlarged region.
 10. The electronic deviceof claim 7, wherein the character recognition is performed on thedetected region, which is smaller than the image, to pre-recognize theat least two characters in the detected region.
 11. The electronicdevice of claim 7, wherein the display is configured to output at leastone of a camera preview image, the image obtained by the camera, and theresults of the optical character recognition.
 12. The electronic deviceof claim 7, wherein the processor decreases the optical zoom ratio toresize the at least two characters if a size of each of the at least twocharacters in the detected region is greater than the minimumdistinguishable character size.
 13. The electronic device of claim 7,wherein the processor is further configured to detect a line on whichthe at least two characters exist and calculate a height and a length ofthe at least two characters on the line.
 14. A electronic devicecomprising: a camera; a display; and a processor configured to: controlthe camera to obtain an image containing characters, and adjust a focusof the camera; detect a region and a size of characters in the image;control to determine whether the size of the characters in the imagefalls within a recognizable character size range; in response todetecting that the size of the characters is greater than therecognizable character size range, recognize the characters in the imageand control the display to display recognition results; in response todetecting that the size of the characters is less than the recognizablecharacter size range, control the camera to automatically adjust anoptical zoom ratio of the camera and resize the obtained image so thatthe size of the characters in the image falls within the recognizablecharacter size range, and recognize the characters in the resized image;in response to detecting that the size of the characters is less than alower limit of the recognizable character size range and if a zoom rationeeded to compensate the image is higher than a maximum zoom ratio,generate a notification for informing a user that the size of thecharacters is less than a lower limit of the recognizable character sizerange; enlarge a region corresponding to the characters in the resizedimage using a digital zoom function; and recognize the characters in theenlarged region and display recognition results, wherein thenotification comprises a message indicating that the size of thecharacters is less than the lower limit of the recognizable charactersize range.